<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/reset.css">
    <style>
        ul {
            width: 300px;
            height: 300px;
            margin: 50px auto;
            background-color: #ff0;
            position: relative;
        }

        li {
            float: left;
        }


        label {
            float: left;
            width: 20px;
            height: 20px;
            background-color: #00f;
            margin: 10px;
        }

        input {
            display: none;
        }

        input:checked+label {
            color: red;
        }

        .hide {
            width: 200px;
            height: 200px;
            background-color: #f00;

            position: absolute;
            top: 50px;
            left: 0;

            visibility: hidden;
        }

        input:checked~.hide {
            visibility: visible;
        }
    </style>
</head>

<body>

    <ul>
        <li>
            <input type="radio" name="s" id="a1">
            <label for="a1"></label>
            <div class="hide">1</div>
        </li>
        <li>
            <input type="radio" name="s" id="a2">
            <label for="a2"></label>
            <div class="hide">2</div>
        </li>
    </ul>

</body>

</html>